package com.common.test.manager;

import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
import org.springframework.context.ConfigurableApplicationContext;

import com.common.context.ApplicationContextUtil;

public abstract class BaseManagerTestCase extends AbstractTransactionalDataSourceSpringContextTests {

    protected BaseManagerTestCase() {
        setDefaultRollback(false);
    }

    protected String[] getConfigLocations() {
        return new String[]{"config/applicationContext-dao.xml", "config/applicationContext-manager.xml"};
    }


    protected ConfigurableApplicationContext createApplicationContext(String[] strings) {
        ConfigurableApplicationContext ctx = super.createApplicationContext(strings);
        ApplicationContextUtil.setApplicationContext(ctx);
        return ctx;
    }
}